#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import time
import platform
from jx_python.logger_decorator import logger

cur_file_name = os.path.basename(__file__)


def spend_time(func):
	def wrapper(*args, **kw):
		start = time.time()
		func(*args, **kw)
		end = time.time()
		print('func %s spend_time %ss' % (func.__name__, (end - start)))
	return wrapper


@logger(cur_file_name)
def loop(num):
	for i in range(num):
		print(i)
		time.sleep(1)


if __name__ == '__main__':
	loop(3)
# print(platform.python_version())
